package cn.itsource.pethome.system.role.mapper;

import cn.itsource.pethome.system.menu.domain.Menu;
import cn.itsource.pethome.system.permission.domain.Permission;
import cn.itsource.pethome.system.role.domain.Role;
import cn.itsource.pethome.base.mapper.BaseMapper;
import cn.itsource.pethome.system.role.domain.RoleMenu;
import cn.itsource.pethome.system.role.domain.RolePermission;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zcj
 * @since 2023-02-02
 */
@Repository
public interface RoleMapper extends BaseMapper<Role> {
   void addRoleMenu(RoleMenu roleMenu);

   void addRolePermission(RolePermission rolePermission);

   List<Menu> getMenuByRoleId(Long id);

   List<Permission> getPermissionByRoleId(Long id);

   void delMenuByRoleId(Long id);

   void delPermissionByRoleId(Long id);

   List<String> getPermissionsByRoleIds(List<Long> ids);
}
